<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="" method="post">
    <select name="tid" >
        <option value="">选择类型</option>
        {% for i in stu %}
        <option value="{{ i.id }}">{{ i.tname }}</option>
        {% endfor %}
    </select>
    <input type="submit" value="过滤">
</form>
<table border="1" cellspacing="0">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>事由</th>
        <th>状态</th>
        <th>类型</th>
        <th colspan="2">操作</th>
    </tr>
    {% for i in pagex %}
    <tr>
        <td>{{ i.id }}</td>
        <td>{{ i.stu_name }}</td>
        <td>{{ i.context }}</td>
        <td>{{ i.get_status_display }}</td>
        <td>{{ i.tid.tname }}</td>
        <td><a href="#">通过</a>&nbsp;&nbsp;<a href="#">不通过</a></td>
    </tr>
    {% endfor %}
</table>
{% if pagex.number > 1 %}
    <a href="{% url 't_index' %}?page={{ pagex.number|add:-1 }}">上一页</a>
{% endif %}
&nbsp;&nbsp;<b>当前页{{ pagex.number }}
    {% if hasnext %}
        </b> &nbsp;&nbsp;<a href="{% url 't_index' %}?page={{ pagex.number|add:1 }}">下一页</a>
    {% endif %}
</body>
</html>